<template>
<div class="index">
  <navbar :item="currentItem"></navbar>
  <content-single :item="currentItem"></content-single>
  <input-row :activity="currentItem.activity"></input-row>
</div>
</template>

<script>
import {getMessageData} from "@/network/message";
import Navbar from "./navbar";
import ContentSingle from './contentSingle'
import InputRow from "./inputRow";
export default {
name: "index",
  components: {InputRow , Navbar,ContentSingle},
  data(){
  return{
    id: this.$route.query.id,
    currentItem:{}
  }
  },
  created() {
    getMessageData().then(res=>{
      let id=this.id;
      let item=res.data.message.filter(function (n){
        return n.id===id
      })
      this.currentItem=item[0];
    })
  }
}
</script>

<style scoped>
.index{
  width: 100vw;
  height: 100vh;
  background-color: #E6E6E6;
}
</style>